home *** CD-ROM | disk | FTP | other *** search
- Path: user1.mnsinc.com!huang
- From: huang@mnsinc.com (Szu-Wen Huang)
- Newsgroups: comp.lang.c
- Subject: Re: Tradition or what?
- Date: 9 Mar 1996 00:54:48 GMT
- Organization: Monumental Network Systems
- Message-ID: <4hqkso$gno@news1.mnsinc.com>
- References: <4g0elg$mdr@redstone.interpath.net> <4hpd8a$d70@alterdial.UU.NET> <1996Mar8.153250.115645@kuhub.cc.ukans.edu> <4hqfug$19l@news.interpath.net>
- NNTP-Posting-Host: user.mnsinc.com
- X-Newsreader: TIN [version 1.2 PL2]
-
- Scott McMahan - Softbase Systems (softbase@mercury.interpath.net) wrote:
- : anh@kuhub.cc.ukans.edu wrote:
- : : Well, I found one good use of magic numbers such as when one needs a
- : : localized temporary buffer of data.
- : : Well, if I know the data is always going to be less than 15 or whatever,
- : : there is really no need to use a #define here.
-
- : You defeated your own argument!
-
- : Suppose you "know" that your buffer is "always" going to be 80
- : bytes. Then it changes to 132!
-
- Let me join in. I use magic numbers for states in parsing tables,
- and will shoot anybody who suggests I should #define state numbers.
- I hope we buried the issue, now that I've given one good place to
- use magic numbers instead of #define's.
-